package com.lizemin.factoryBean;

import com.lizemin.factoryBean.entity.Dog;
import org.springframework.beans.factory.FactoryBean;

/**
 * @author lzm
 * @date 2025/10/19 21:07
 * @description
 */
public class DogFactoryBean implements FactoryBean<Dog> {

    /**
     * spring会将该方法返回的对象注册到spring容器中，该对象的名字为dogFactoryBean，也就是实现类类名的小写
     *
     * @return dog对象
     */
    @Override
    public Dog getObject() {
        return new Dog("小白", 28);
    }

    @Override
    public Class<?> getObjectType() {
        return Dog.class;
    }


}
